package com.zbdx.dao;

import com.zbdx.domain.product;

import java.sql.SQLException;
import java.util.List;

public interface IGoodsDao {
    //添加商品
    int insert(product product) throws SQLException;
    //根据Id删除商品
    int deleteById(int PId) throws SQLException;

    //修改商品
    int update(product product) throws SQLException;
    //根据商品类型查询商品
    List<product> selectByType(String PType) throws SQLException;
    //根据商品Id查询商品
    product selectById(int PId) throws SQLException;
    //根据搜索条件查询
    List<product> search(String PName, String PType, String Id) throws SQLException;
    //查询所有商品
    List<product> selectAll() throws SQLException;
    int removeSelect(List<Integer> ids) throws SQLException;
}
